<template>
  <el-dialog :visible="value" :before-close="cancel">
    <template slot="title">
      二次确认弹窗
    </template>
    <div>
      <div class="desc" v-if="rowData.userType=='agency'">
        <div class="m-b-sm">是否需要将代理账户{{rowData.proxyName}}设置为虚拟代理账户？</div>
        <div class="m-b-sm">设置为虚拟代理账户后，下级所有直属会员都会变为虚拟会员账户</div>
        <div class="warning">特别提示：设置此代理账户为虚拟账户后，无法再更改为真实账户</div>
      </div>
      <div class="desc" v-else >
        <div class="m-b-sm">是否需要将会员账户{{rowData.userName}}设置为虚拟会员账户？</div>
        <div class="warning">特别提示：设置此会员账户为虚拟账户后，无法再更改为真实账户</div>
      </div>
    </div>
    <div slot="footer" class="dialog-footer">
      <el-button @click="cancel">取 消</el-button>
      <el-button type="primary" @click="submit()">确 定</el-button>
    </div>
  </el-dialog>
</template>

<script>
  import {addMemberComment} from '@/services/api/member'
  import {form} from '@/build'

  export default {
    name: "virtual-agency-dialog",
    props: ['value', 'rowData'],
    mixins: [form],
    computed:{

    },
    methods: {
      cancel() {
        this.$emit('input',false)
      },
      submit() {
        this.$emit('submit',this.rowData);
        this.cancel();
      }
    },
    mounted() {

    }
  }
</script>

<style scoped>
  .m-b-sm{
    margin-bottom: 10px;
  }
  .warning{
    color: red;
  }

</style>
